home *** CD-ROM | disk | FTP | other *** search
/ PsL Monthly 1993 December / PSL Monthly Shareware CD-ROM (December 1993).iso / prgmming / dos / pascal / curdle.com / CURDLASM.ARC / PASMAC.ASM < prev   
Encoding:
Assembly Source File  |  1989-01-10  |  854 b   |  29 lines

  1.       ;Pascal macros for use with TASM
  2.       ;By John M. Majkrzak CIS# 76617,264
  3.       ;See assembler source file for usage example.
  4.  
  5.       include genmac.asm                 
  6.  
  7.       m_Entry macro LocalSize                     
  8.       push bp                          ;Standard TPascal entry code.
  9.       mov  bp, sp
  10.       ifb <LocalSize> 
  11.         exitm
  12.       endif
  13.       ife <LocalSize> 
  14.         exitm 
  15.       endif
  16.       sub  sp, LocalSize               ;Allocate space for local variables
  17.     endm
  18.  
  19.     m_Exit macro  
  20.       mov  sp,bp                          ;Standard exit for TPascal.
  21.       pop  bp
  22.       SizeOnStack = type OnStack          ;OnStack struc must be used with
  23.       SizeRetAddr = type OnStack.RetAddr  ;this macro
  24.       ret SizeOnStack - SizeRetAddr - 2   ;Far or near is determined by entry.
  25.     endm
  26.  
  27.     
  28.  
  29.